#!/bin/sh
top[0]=600986
top[1]=600794
top[2]=600233
top[3]=002015
top[4]=000957
top[5]=600559
top[6]=600869
top[7]=002058
top[8]=600076
top[9]=600113
top[10]=600273
top[11]=600728
top[12]=000712
top[13]=600545
top[14]=000836
top[15]=600885
top[16]=002057
top[17]=000673
top[18]=000558
top[19]=000606
top[20]=600850
top[21]=000672
top[22]=600687
top[23]=600335
top[24]=000861
top[25]=000967
top[26]=002020
top[27]=000915
top[28]=000716
top[29]=600148
top[30]=600165
top[31]=600265
top[32]=000567
top[33]=600285
top[34]=002034
top[35]=600766
top[36]=000691
top[37]=600241
top[38]=600891
top[39]=000791
top[40]=600760
top[41]=002044
top[42]=600792
top[43]=000670
top[44]=000996
top[45]=000411
top[46]=000586
top[47]=600658
top[48]=000546
top[49]=600793
top[50]=600353
top[51]=000803
top[52]=000705
top[53]=600735
top[54]=000809
top[55]=600566
top[56]=000693
top[57]=600985
top[58]=600614
top[59]=600097
top[60]=002006
top[61]=600340
top[62]=000980
top[63]=000509
top[64]=000506
top[65]=600455
top[66]=600070
top[67]=002002
top[68]=600506
top[69]=600715
top[70]=600984
top[71]=600568
top[72]=002011
top[73]=600753
top[74]=002013
top[75]=600532
top[76]=000688
top[77]=600259
top[78]=600603
top[79]=600490
top[80]=000703
top[81]=600520
top[82]=000587
top[83]=600513
top[84]=600593
top[85]=000007
top[86]=600444
top[87]=000710
top[88]=000639
top[89]=600551
top[90]=600647
top[91]=600346
top[92]=000038
top[93]=600503
top[94]=000711
top[95]=600634
top[96]=600373
top[97]=000409
top[98]=600562
top[99]=600699
top[100]=000526
top[101]=000925
top[102]=000408
top[103]=000605
top[104]=000669
top[105]=600552
top[106]=000979
top[107]=000545
top[108]=600706
top[109]=002042
top[110]=000004
top[111]=000603
top[112]=002016
top[113]=600136
top[114]=600385
top[115]=600419
top[116]=600847
top[117]=000008
top[118]=600892
top[119]=000732
top[120]=000555
top[121]=600242
top[122]=600703
top[123]=600745
startYear=2007
file="10_200"

	
for month in 01 02 03 04 05 06 07 08 09 10 11 12
do
###

######################
	echo "BEGIN {

}

\$1 ~ /${startYear}${month}/{
	print
}

END {

}" > ${startYear}.awk
######################

i=0
while [ $i -le 123 ]
do
##
	awk -f ${startYear}.awk ${top[i]}.${file}.whole.return >> ${startYear}${month}.temp.return
	i=$((i+1))
##
done

awk -f sumup.awk ${startYear}${month}.temp.return >> ${startYear}.${file}.average.return

###
done



rm ${startYear}.awk
rm *.temp.return

